home *** CD-ROM | disk | FTP | other *** search
/ CDUTIL 13 / CDUTIL #13 Julio 1995.iso / windows / acadwin / ads / cpp / dde / ddeglob.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-08  |  1.9 KB  |  56 lines

  1. /* 
  2.     
  3.     This file:
  4.  
  5.         Declares global objects DDE_GLOBAL, this object is 
  6.         created once and only once to set up some essential
  7.         information in a ADS DDE application, such as connection
  8.         to ACAD and the global DDE instance ID.
  9.  
  10.     (C) Copyright 1988-1994 by Autodesk, Inc.
  11.  
  12.     This program is copyrighted by Autodesk, Inc. and is  licensed
  13.     to you under the following conditions.  You may not distribute
  14.     or  publish the source code of this program in any form.   You
  15.     may  incorporate this code in object form in derivative  works
  16.     provided  such  derivative  works  are  (i.) are  designed and
  17.     intended  to  work  solely  with  Autodesk, Inc. products, and
  18.     (ii.)  contain  Autodesk's  copyright  notice  "(C)  Copyright
  19.     1988-1994 by Autodesk, Inc."
  20.  
  21.     AUTODESK  PROVIDES THIS PROGRAM "AS IS" AND WITH  ALL  FAULTS.
  22.     AUTODESK  SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF  MER-
  23.     CHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK,  INC.
  24.     DOES  NOT  WARRANT THAT THE OPERATION OF THE PROGRAM  WILL  BE
  25.     UNINTERRUPTED OR ERROR FREE.
  26. */
  27.  
  28. #ifndef DDE_GLOB_H
  29. #define DDE_GLOB_H
  30.  
  31. //-----------------------------------------------------------------------------
  32. //
  33. struct  DDE_GLOBAL : ADS_OBJ
  34. {
  35.     static SS_SERVER_INFO           *excel_server_info;
  36.     static SERVER_INFO              *acad_info;
  37.     static DDE_CLIENT_CONNECTION    *acad_connection;
  38.  
  39.     static DWORD                    InstId;
  40.     static DWORD                    GetInstId()
  41.                                     { 
  42.                                         ASSERT( InstId != 0 );
  43.                                         return InstId; 
  44.                                     }
  45.  
  46.                                     DDE_GLOBAL();
  47.                                     ~DDE_GLOBAL();
  48.  
  49.     BOOL                            Valid() { return TRUE; }
  50. };
  51.  
  52. extern  DDE_GLOBAL  dde_global;
  53.  
  54. #endif
  55.  
  56.